package org.fengling.readingplatform.manager.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.fengling.readingplatform.manager.mapper.MemberMapper;
import org.fengling.readingplatform.manager.service.MemberService;
import org.fengling.readingplatform.model.dto.member.MemberDto;
import org.fengling.readingplatform.model.entity.member.Member;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MemberServiceImpl implements MemberService {


    @Autowired
    private MemberMapper memberMapper;


    // 会员分页查询方法
    @Override
    public PageInfo<Member> findByPage(Integer pageNum, Integer pageSize, MemberDto memberDto) {
        PageHelper.startPage(pageNum,pageSize);
        List<Member> list = memberMapper.findByPage(memberDto);
        PageInfo<Member> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    // 会员查询方法




    // 会员禁用方法


}
